#!/bin/sh

if [ -f "/etc/project.conf" ]
then
	source /etc/project.conf 
fi

echo "[${USER}][`date`] - 运行 $0 $@" >> ${LOG_FILE}
echo "[${USER}][`date`] - start app list:${app_list}" >> ${LOG_FILE}

for index in ${app_on_list}
do
	app=`echo ${app_list}|awk -F ' ' '{print $'$index'}'`
	app_device_folder=`echo ${app_device_folder_list}|awk -F ' ' '{print $'$index'}'`

	app_dir=${prj_app_path}/${app_device_folder}
	echo "[${USER}][`date`] - startup app :${app_dir}/${app}" >> ${LOG_FILE}
	cd ${app_dir}
	./guard_${app}.sh &

done
